home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / OpenTransport / Interfaces / PInterfaces / OpenTptLinks.p < prev    next >
Encoding:
Text File  |  1997-11-24  |  4.8 KB  |  180 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OpenTptLinks.p
  3.  
  4.      Contains:    Definitions for link modules
  5.  
  6.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  7.                  All rights reserved.
  8.  
  9. }
  10. {$IFC UNDEFINED UsingIncludes}
  11. {$SETC UsingIncludes := 0}
  12. {$ENDC}
  13.  
  14. {$IFC NOT UsingIncludes}
  15.  UNIT OpenTptLinks;
  16.  INTERFACE
  17. {$ENDC}
  18.  
  19. {$IFC UNDEFINED __OPENTPTLINKS__}
  20. {$SETC __OPENTPTLINKS__ := 1}
  21.  
  22. {$I+}
  23. {$SETC OpenTptLinksIncludes := UsingIncludes}
  24. {$SETC UsingIncludes := 1}
  25.  
  26. {$IFC UNDEFINED __OPENTRANSPORT__}
  27. {$I OpenTransport.p}
  28. {$ENDC}
  29.  
  30. {$PUSH}
  31. {$ALIGN MAC68K}
  32. {$LibExport+}
  33.  
  34. {
  35. ******************************************************************************
  36. ** Device Types for OTPortRefs
  37. *******************************************************************************
  38. }
  39.  
  40. CONST
  41.     kOTADEVDevice                = 1;                            {  An Atalk ADEV         }
  42.     kOTMDEVDevice                = 2;                            {  A TCP/IP MDEV         }
  43.     kOTLocalTalkDevice            = 3;                            {  LocalTalk             }
  44.     kOTIRTalkDevice                = 4;                            {  IRTalk                 }
  45.     kOTTokenRingDevice            = 5;                            {  Token Ring             }
  46.     kOTISDNDevice                = 6;                            {  ISDN                     }
  47.     kOTATMDevice                = 7;                            {  ATM                     }
  48.     kOTSMDSDevice                = 8;                            {  SMDS                     }
  49.     kOTSerialDevice                = 9;                            {  Serial                  }
  50.     kOTEthernetDevice            = 10;                            {  Ethernet                 }
  51.     kOTSLIPDevice                = 11;                            {  SLIP Pseudo-device     }
  52.     kOTPPPDevice                = 12;                            {  PPP Pseudo-device     }
  53.     kOTModemDevice                = 13;                            {  Modem Pseudo-Device     }
  54.     kOTFastEthernetDevice        = 14;                            {  100 MB Ethernet         }
  55.     kOTFDDIDevice                = 15;                            {  FDDI                     }
  56.     kOTIrDADevice                = 16;                            {  IrDA Infrared         }
  57.     kOTATMSNAPDevice            = 17;                            {  ATM SNAP emulation     }
  58.     kOTFibreChannelDevice        = 18;                            {  Fibre Channel         }
  59.     kOTFireWireDevice            = 19;                            {  FireWire link Device     }
  60.  
  61. {
  62. ******************************************************************************
  63. ** Interface option flags
  64. *******************************************************************************
  65. }
  66. {  Ethernet framing options }
  67.     kOTFramingEthernet            = $01;
  68.     kOTFramingEthernetIPX        = $02;
  69.     kOTFraming8023                = $04;
  70.     kOTFraming8022                = $08;
  71.  
  72. {  OPT_SETPROMISCUOUS value }
  73.     DL_PROMISC_OFF                = 0;
  74.  
  75. {
  76. ******************************************************************************
  77. ** Module definitions
  78. *******************************************************************************
  79. }
  80. {  XTI Levels }
  81.     LNK_ENET                    = 'ENET';
  82.     LNK_TOKN                    = 'TOKN';
  83.     LNK_FDDI                    = 'FDDI';
  84.     LNK_TPI                        = 'LTPI';
  85.  
  86. {  Module IDs }
  87.     kT8022ModuleID                = 7100;
  88.     kEnetModuleID                = 7101;
  89.     kTokenRingModuleID            = 7102;
  90.     kFDDIModuleID                = 7103;
  91.  
  92. {  Module Names }
  93.  
  94.     kEnet8022Name                = 'enet8022x';
  95.     kEnetName                    = 'enet';
  96.     kFastEnetName                = 'fenet';
  97.     kTokenRingName                = 'tokn';
  98.     kFDDIName                    = 'fddi';
  99.     kIRTalkName                    = 'irtlk';
  100.     kSMDSName                    = 'smds';
  101.     kATMName                    = 'atm';
  102.     kT8022Name                    = 'tpi8022x';
  103.     kATMSNAPName                = 'atmsnap';
  104.     kFireWireName                = "firewire";
  105.     kFibreChannelName            = "fibre";
  106.  
  107. {  Address Family }
  108.     AF_8022                        = 8200;                            {  Our 802.2 generic address family     }
  109.  
  110. {
  111. ******************************************************************************
  112. ** Options
  113. *******************************************************************************
  114. }
  115.     OPT_ADDMCAST                = $1000;
  116.     OPT_DELMCAST                = $1001;
  117.     OPT_RCVPACKETTYPE            = $1002;
  118.     OPT_RCVDESTADDR                = $1003;
  119.     OPT_SETRAWMODE                = $1004;
  120.     OPT_SETPROMISCUOUS            = $1005;
  121.  
  122.     kETypeStandard                = 0;
  123.     kETypeMulticast                = 1;
  124.     kETypeBroadcast                = 2;
  125.     kETRawPacketBit                = $80000000;
  126.     kETTimeStampBit                = $40000000;
  127.  
  128. {
  129. ******************************************************************************
  130. ** Link related constants
  131. *******************************************************************************
  132. }
  133.     kMulticastLength            = 6;                            {  length of ENET hardware addresses     }
  134.     k48BitAddrLength            = 6;
  135.     k8022DLSAPLength            = 2;                            {  The protocol type is our DLSAP         }
  136.     k8022SNAPLength                = 5;
  137.     kEnetAddressLength            = 8;
  138.     kSNAPSAP                    = $00AA;                        {  Some special DLSAPS for ENET         }
  139.     kIPXSAP                        = $00FF;
  140.     kMax8022SAP                    = $00FE;
  141.     k8022GlobalSAP                = $00FF;
  142.     kMinDIXSAP                    = 1501;
  143.     kMaxDIXSAP                    = $FFFF;
  144.  
  145. {
  146. ******************************************************************************
  147. ** Generic Address Structure
  148. *******************************************************************************
  149. }
  150.  
  151. TYPE
  152.     T8022AddressPtr = ^T8022Address;
  153.     T8022Address = RECORD
  154.         fAddrFamily:            OTAddressType;
  155.         fHWAddr:                PACKED ARRAY [0..5] OF UInt8;
  156.         fSAP:                    UInt16;
  157.         fSNAP:                    PACKED ARRAY [0..4] OF UInt8;
  158.     END;
  159.  
  160.  
  161. CONST
  162.     k8022BasicAddressLength        = 10;
  163.     k8022SNAPAddressLength        = 15;
  164.  
  165. {
  166. ******************************************************************************
  167. ** Some helpful stuff for dealing with 48 bit addresses
  168. *******************************************************************************
  169. }
  170. {$ALIGN RESET}
  171. {$POP}
  172.  
  173. {$SETC UsingIncludes := OpenTptLinksIncludes}
  174.  
  175. {$ENDC} {__OPENTPTLINKS__}
  176.  
  177. {$IFC NOT UsingIncludes}
  178.  END.
  179. {$ENDC}
  180.